function fir_ord=JacAssemble(MODEL,EquJac)

%% Preliminaries
VV_List     =   {'XX','XXp','YY','YYp'};
Num_Equ     =   length(MODEL.Info.EquList);
fir_ord     =   struct();
%% Evluation
for ii_VV=1:length(VV_List)
    % for each Variable Blocks
    VV          =   VV_List{ii_VV};
    RowCell     =   cell(Num_Equ,1);
    ColCell     =   cell(Num_Equ,1);
    ValCell     =   cell(Num_Equ,1);
    RowStart    =   0;
    for ii_Equ=1:Num_Equ
        Equ         =   MODEL.Info.EquList{ii_Equ};
        for ii_vv=1:MODEL.VarBlock.(VV).VarNum
            vv          =   MODEL.VarBlock.(VV).VarList{ii_vv};
            ColStart    =   MODEL.VarBlock.(VV).LocIdx.(vv)(1)-1;
            if ismember(vv,MODEL.EquBlock.(Equ).Var.In) || ismember(vv,MODEL.EquBlock.(Equ).Var.Out)
                [Rows,Cols,Vals]    =   find(EquJac.(Equ).(vv));
                RowCell{ii_Equ}     =   [RowCell{ii_Equ};RowStart+Rows];
                ColCell{ii_Equ}     =   [ColCell{ii_Equ};ColStart+Cols];
                ValCell{ii_Equ}     =   [ValCell{ii_Equ};Vals];
            end
        end
        RowStart    =   RowStart+MODEL.EquBlock.(Equ).Dim.Out;
    end
    
    RowInd      =   cat(1,RowCell{:});
    ColInd      =   cat(1,ColCell{:});
    Val         =   cat(1,ValCell{:});
    if isempty(Val)
        fir_ord.(VV)    =   sparse(MODEL.Info.Dim,MODEL.VarBlock.(VV).Dim);
    else
        fir_ord.(VV)    =   sparse(RowInd,ColInd,Val,MODEL.Info.Dim,MODEL.VarBlock.(VV).Dim);
    end
end

